package com.masterclient.app.modules.shop.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eoner.baselibrary.bean.shop.DealerStockItemBean;
import com.masterclient.app.R;

/**
 * @auther hjian
 * @date 2020/10/13.
 */
public class DealerStockRecordAdapter extends BaseQuickAdapter<DealerStockItemBean, BaseViewHolder> {

    public DealerStockRecordAdapter() {
        super(R.layout.item_dealer_stock_record);
    }

    @Override
    protected void convert(BaseViewHolder helper, DealerStockItemBean item) {

            helper.setText(R.id.item_dealer_stock_record_time, item.getAttribute())
                    .setText(R.id.item_dealer_stock_record_title, item.getQty_total())
                    .setText(R.id.item_dealer_stock_record_remark, item.getQty())
                    .setGone(R.id.item_dealer_stock_record_line, helper.getAdapterPosition()!=getItemCount()-1);
    }
}
